#include "process.h"

int main(int argc, char **argv)
{
  if(argc != 2)
    {
      std::cerr<<"Please give one input image\n";
      return(-1);
    }
  // Read image
  cv::Mat im = cv::imread(argv[1], CV_LOAD_IMAGE_UNCHANGED), im_copy;
  im.copyTo(im_copy);
  // Extract most probable paper ROI
  cv::RotatedRect box = get_ROI(im_copy);

  // Calibrate based on templates, points and lines within ROI

  /* Extract the contour within the ROI */
  // Extract the ROI first
  im.copyTo(im_copy);
  cv::Mat roi=im_copy(box.boundingRect());
  vector<vector<cv::Point> > foot_outline = get_Foot_Outline(roi);

  std::cout<<box.angle<<"\n";
  return 0;
}
